package com.yankaizhang.blog.mapper;

import com.yankaizhang.blog.entity.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Yankai
 * @since 2020-10-02
 */
public interface ArticleMapper extends BaseMapper<Article> {

    List<Integer> getYears();

    List<Article> getArticlesByYear(Integer year);

    Integer getArticleCount();

    Integer getTotalViews();

    List<Article> getArticleByTag(String tag);
}
